package com.example.test_flutter

import android.os.Bundle
import android.view.Window
import androidx.appcompat.app.AppCompatActivity
import io.flutter.embedding.android.FlutterFragment

class FlutterFragmentActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_flutter_fragment)

        // 跳转到flutter
        val createDefault = FlutterFragment.createDefault()
        val beginTransaction = supportFragmentManager.beginTransaction()
        beginTransaction.add(R.id.fragmentLayout, createDefault)
        beginTransaction.commit()
    }

}